#inventoryTable {
    border-collapse: collapse;
    width: auto; /* 关键修改：不再强制100%宽度 */
    table-layout: auto; /* 确保列宽由内容驱动（默认值可省略） */
    margin: 10px 0; /* 添加间距更美观 */
}

#inventoryTable th,
#inventoryTable td {
    border: 1px solid #000;
    padding: 8px;
    text-align: center; /* 保留原有的居中 */

    /* 新增自适应关键代码 */
    white-space: nowrap;  /* 禁止内容换行 */
    min-width: 80px;      /* 最小列宽保护 */
    max-width: 300px;     /* 最大列宽保护 */
    overflow: hidden;     /* 超出隐藏 */
    text-overflow: ellipsis; /* 文字过长显示... */
}

/* 选配：针对特定列设置弹性宽度 */
#inventoryTable td:nth-child(2) {  /* 假设第2列需要弹性宽度 */
    max-width: unset;
    white-space: normal;
    word-break: break-word;
}

/* carList.html 专用美化样式 */
body {
    background: linear-gradient(120deg, #f8fafc 0%, #e0e7ef 100%);
    font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Arial', sans-serif;
    margin: 0;
    min-height: 100vh;
}
h2 {
    text-align: center;
    color: #2d3a4b;
    margin-top: 32px;
    letter-spacing: 2px;
    font-size: 2.2rem;
}
table {
    border-collapse: separate;
    border-spacing: 0;
    width: 80%;
    margin: 30px auto;
    background: #fff;
    box-shadow: 0 4px 24px 0 rgba(60,80,120,0.08);
    border-radius: 12px;
    overflow: hidden;
}
th, td {
    border-bottom: 1px solid #e5e9f2;
    padding: 12px 16px;
    text-align: center;
    font-size: 1rem;
}
th {
    background: #f4f7fb;
    color: #3a4a5d;
    font-weight: 600;
}
tr:last-child td {
    border-bottom: none;
}
.btn {
    padding: 7px 18px;
    background: linear-gradient(90deg, #4f8cff 0%, #3ec6e0 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(80,120,200,0.08);
}
.btn:active {
    background: linear-gradient(90deg, #3a6fd8 0%, #2fa6c0 100%);
}
.btn[style*="background:#2196F3"] {
    background: linear-gradient(90deg, #2196F3 0%, #21cbf3 100%) !important;
}
.btn[style*="background:#aaa"] {
    background: #aaa !important;
}
#signInDetailModal, #thirdLevelModal, #loadInfoModal {
    background: rgba(40,60,90,0.18) !important;
    backdrop-filter: blur(2px);
}
#signInDetailContent, #thirdLevelModal > div, #loadInfoModal > div {
    box-shadow: 0 8px 32px 0 rgba(60,80,120,0.18);
    border-radius: 14px;
    border: 1.5px solid #e0e7ef;
}
#signInDetailContent {
    animation: popIn 0.25s cubic-bezier(.4,2,.6,1) both;
}
#thirdLevelModal > div, #loadInfoModal > div {
    animation: popIn 0.22s cubic-bezier(.4,2,.6,1) both;
}
@keyframes popIn {
    0% { transform: scale(0.92) translateY(40px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
#thirdLevelForm label {
    display: inline-block;
    min-width: 110px;
    color: #2d3a4b;
    font-size: 1rem;
}
#thirdLevelForm input[type="number"] {
    border: 1px solid #cfd8e3;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 1rem;
    background: #f8fafc;
    transition: border 0.2s;
}
#thirdLevelForm input[type="number"]:focus {
    border: 1.5px solid #4f8cff;
    outline: none;
    background: #fff;
}
#modalHouseInfo {
    color: #e74c3c;
    font-size: 1.05rem;
    margin: 8px 0 0 0;
}
@media (max-width: 900px) {
    table, #carListTable, #modalHouseTable, #loadInfoTable {
        width: 98% !important;
        font-size: 0.95rem;
    }
    #signInDetailContent, #loadInfoModal > div {
        width: 98vw !important;
        min-width: 0 !important;
    }
    #thirdLevelModal > div {
        width: 98vw !important;
        min-width: 0 !important;
    }
}
@media (max-width: 600px) {
    h2 { font-size: 1.3rem; }
    th, td { font-size: 0.92rem; padding: 7px 4px; }
    .btn { font-size: 0.92rem; padding: 6px 10px; }
}
